import { writable, type Writable } from "svelte/store";

/**
 * 点击触发animating
 * @returns
 */
export function useClickAnimating(): [Writable<boolean>, () => void] {
    const animating = writable(false)
    const setAnimate = () => {
        animating.set(true);
        setTimeout(() => {
            animating.set(false);
        }, 1000);
    };
    return [animating, setAnimate];
}
